package com.wires.lu.practice;



import java.sql.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public enum WaitTimeEnum {
    //1s、 5s、 10s、 30s、 1m、 2m、 3m、 4m、 5m、 6m、 7m、 8m、 9m、 10m、 20m、 30m、 1h、 2h；

    DELAY_35(35,new ArrayList<>(Arrays.asList(2,3))),
    DELAY_70(70,new ArrayList<>((Arrays.asList(3,5)))),
    DELAY_105(105,new ArrayList<>(Arrays.asList(2,3,4,5))),
    DELAY_140(140,new ArrayList<>(Arrays.asList(3,3,6)));

    private Integer waitTime;
    private List<Integer> levelList;

    WaitTimeEnum(Integer waitTime,List<Integer> levelList){
        this.waitTime=waitTime;
        this.levelList=levelList;
    }

    public Integer getWaitTime() {
        return waitTime;
    }

    public void setWaitTime(Integer waitTime) {
        this.waitTime = waitTime;
    }

    public List<Integer> getLevelList() {
        return levelList;
    }

    public void setLevelList(List<Integer> levelList) {
        this.levelList = levelList;
    }

    public static WaitTimeEnum getObjectByTime(Integer waitTime){
        if(waitTime==null){
            return null;
        }
        return Enum.valueOf(WaitTimeEnum.class,"DELAY_"+waitTime);
    }
}
